<template>
  <div>
      <div class="box2">
        <input type="checkbox" v-model="bool">
        <h1 v-if="bool">测试v-if</h1>
        <h1 v-show="bool">测试v-show</h1>
        <h1>{{this.$store.state.name}}</h1>
    </div>
  </div>
</template>

<script>
export default {
data(){
    return{
        bool:false
    }
}
}
</script>

<style>

</style>